﻿<%@ Page Title="Asah Consulting - Product Detail" Language="C#" MasterPageFile="~/Main.master"
    AutoEventWireup="true" CodeFile="ProductDetail.aspx.cs" Inherits="ProductDetail" %>

<%@ Register Assembly="Csla" Namespace="Csla.Web" TagPrefix="cc1" %>
<%@ Register Src="App_Common/UserControls/AddToCart.ascx" TagName="AddToCart" TagPrefix="siteWorx" %>
<asp:Content ID="cntProductDetail" ContentPlaceHolderID="cphZone1" runat="Server">
    <asp:FormView ID="fvProductDetail" runat="server" DataSourceID="cdsProductInfo">
        <ItemTemplate>
            <div id="productMasterContainer">
                <div id="leftSubContainer">
                    <div id="productDetailImage">
                        <a runat="server" id="hrefFullSize" href="#" onclick='<%# "javascript: window.open(\"FullSizeImage.aspx?ImagePath=" + Eval("ImagePath") + "\",\"mywindow\",\"location=0,status=0,scrollbars=0,width=500,height=375\");return false;" %>'>
                            <asp:Image runat="server" ID="imgProductDetail" BorderWidth="0" ImageUrl='<%# "App_Common/UserControls/ImageHandler.ashx?ImagePath=" + Eval("ImagePath") + "&Size=" + DetailSize %>' /></a>
                    </div>
                    <div id="productDetailFullSize">
                    </div>
                </div>
                <div id="rightSubContainer">
                    <div id="productName">
                        <asp:Label runat="server" ID="lblProductTitle" Text='<%# Bind("Title") %>'></asp:Label></div>
                    <div>
                        <asp:Label runat="server" ID="lblProductDescription" Text='<%# Bind("Description") %>'></asp:Label></div>
                    <br />
                    <div>
                        <asp:Label runat="server" ID="lblProductDimensions" Text='<%# Bind("Dimensions") %>'></asp:Label></div>
                    <br />
                    <div>Item Number:&nbsp;<asp:Label runat="server" ID="lblProductItemNumber" Text='<%# Bind("ItemNumber") %>'></asp:Label></div>
                    <siteWorx:AddToCart ID="ctlAddToCart" runat="server" Visible='<%# User.IsInRole("Customer") %>' ItemNumber='<%# Bind("ItemNumber") %>' ProductTitle='<%# Bind("Title") %>' UnitPrice='<%# Bind("UnitPrice") %>' />
                    <br />
                    <asp:LinkButton ID="lnkReturn" runat="server" OnClick="lnkReturn_Click">Return To List</asp:LinkButton>
                </div>
            </div>
            </table>
        </ItemTemplate>
        <EmptyDataTemplate>
            Product Detail not found!
        </EmptyDataTemplate>
    </asp:FormView>
    <cc1:CslaDataSource ID="cdsProductInfo" runat="server" TypeAssemblyName="Asah" TypeName="Asah.SiteWorx.ProductCatalog.ProductInfo"
        OnSelectObject="cdsProductInfo_SelectObject" />
</asp:Content>
